import request from '@/utils/request'
import qs from "querystring"
export default{
    //分页查询
    getPageList(pageNum,pageSize,sort){
        return request({
            url:"/api-order/return/order/getPages",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort,
            }
        })
    },

    //筛选查询
    getListByOrder(pageNum,pageSize,sort,id,linkman,linkmanMobile,applyTime,status,disposeTime,adminId){
        return request({
            url:"/api-order/return/order/getPageList",
            method:"get",
            params:{pageNum,pageSize,sort,id,linkman,linkmanMobile,applyTime,status,disposeTime,adminId}
        })
    },

    //退款查询，根据type分类
    getFindAll(pageNum,pageSize,sort){
        return request({
            url:"/api-order/return/order/getFindAll",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort
            }
        });
    },

    //筛选查询
    getListMs(pageNum,pageSize,sort,id,linkman,linkmanMobile,applyTime,status,disposeTime,adminId){
        return request({
            url:"/api-order/return/order/getFindMs",
            method:"get",
            params:{pageNum,pageSize,sort,id,linkman,linkmanMobile,applyTime,status,disposeTime,adminId}
        })
    },

    //查询记数
    getAllObj(status){
        return request({
            url:"/api-order/return/order/getAllObj",
            method:"get",
            params:{status}
        })
    },

    //查询记录2
    getAllObjTwo(status){
        return request({
            url:"/api-order/return/order/getAllObjTwo",
            method:"get",
            params:{status}
        })
    },

    //根据是否已拒绝删除
    getAllDel(ids){
        console.log(ids)
        var data=qs.stringify({ids})
        return request({
            url:"/api-order/return/order/getAllDel",
            method:"delete",
            data
        })
    },

    //根据id改变状态
    getUpdateStatus(ids){
        var data=qs.stringify({ids})
        return request({
            url:"/api-order/return/order/getUpdateStatus",
            method:"post",
            data
        })
    },

    //根据id改变状态
    getUpdateStatusTwo(ids){
        var data=qs.stringify({ids})
        return request({
            url:"/api-order/return/order/getUpdateStatusTwo",
            method:"post",
            data
        })
    },

}